﻿// AtlControl.cpp: CAtlControl 的实现
#include "pch.h"
#include "AtlControl.h"


// CAtlControl

LRESULT CAtlControl::OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
    int xPos = GET_X_LPARAM(lParam);
    int yPos = GET_Y_LPARAM(lParam);

    TCHAR StringBuff[0x40] = { 0 };
    TCHAR PointBuff[0x20] = { 0 };

    _tcscat_s(StringBuff, L"The point is ");
    _stprintf_s(PointBuff, L"%d:%d", xPos, yPos);
    _tcscat_s(StringBuff, PointBuff);
    BSTR lpbString = SysAllocString(StringBuff);
    FireCPTest(lpbString);

    return TRUE;
}
